package com.gxa.admin.pojo.dto;

import com.gxa.admin.utils.PageInfo;
import lombok.Data;

import javax.validation.constraints.*;
import java.math.BigDecimal;
import java.util.Date;

/**
 * @author lch
 * @date 2024/3/21 9:52
 * @description 用户信息
 **/
@Data
public class UserDto extends PageInfo {

    //用户id
    private Integer userId;

    //用户昵称
    @NotBlank(message = "用户昵称不能为空")
    private String userNick;

    //用户姓名
    @NotBlank(message = "用户姓名不能为空")
    private String userName;

    //用户电话
    @Pattern(regexp = "^1[3-9]\\d{9}$", message = "手机号格式错误")
    private String userTel;

    //用户生注册时间
    private Date userBirth;

    //用户余额
    @DecimalMin(value = "0.00", message = "余额不能小于0")
    @DecimalMax(value = "999999999.00", message = "余额异常")
    private BigDecimal userMoney;

    //用户的会员等级
    private Integer userVipId;

    //用户积分
    @Min(value = 0, message = "积分不能小于0")
    @Max(value = 999999999, message = "积分异常")
    private Integer userScore;

    //用户性别
    @Pattern(regexp = "^(男|女)$", message = "性别只能为男或者女")
    private String userSex;

}
